package com.ks.app.navigate.hibernate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


/**
 * KsNavigate entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="KS_NAVIGATE")
public class KsNavigate  implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	
	// Fields    

     private long id;          //主键
     private long parentid;    //上级导航条主键
     private String name;      //导航条名称
     private String url;       //导航条地址
     private int status;       //导航条状态  2：上线，1：下线
     private int ordernum;     //优先级


    // Constructors

    /** default constructor */
    public KsNavigate() {
    }

    
    /** full constructor */
    public KsNavigate(long parentid, String name, String url, int status,int ordernum) {
        this.parentid = parentid;
        this.name = name;
        this.url = url;
        this.status = status;
        this.ordernum = ordernum;
    }
    
    

   
    // Property accessors
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="nav_gen")
    @SequenceGenerator(name="nav_gen",sequenceName="KS_NAVIGATE_SEQ")
    @Column(name="ID", unique=true, nullable=false, precision=20, scale=0)
    public long getId() {
        return this.id;
    }
    
    public void setId(long id) {
        this.id = id;
    }
    
    @Column(name="PARENTID", precision=20, scale=0)
    public long getParentid() {
        return this.parentid;
    }
    
    public void setParentid(long parentid) {
        this.parentid = parentid;
    }
    
    @Column(name="NAME", length=50)
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    @Column(name="URL", length=200)
    public String getUrl() {
        return this.url;
    }
    
    public void setUrl(String url) {
        this.url = url;
    }
    
    @Column(name="STATUS", precision=1, scale=0)
    public int getStatus() {
        return this.status;
    }
    
    public void setStatus(int status) {
        this.status = status;
    }

    @Column(name="ORDERNUM", precision=5, scale=0)
	public int getOrdernum() {
		return ordernum;
	}

	public void setOrdernum(int ordernum) {
		this.ordernum = ordernum;
	}
   

    
   






}